package com.test;

public class Example18 {
    public static void main(String[] args) {
        int i, j;
        for (i = 1; i <= 9; i++) {
            if(i>4){
                break;      //打印前四行，跳出循环
            }
            for (j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
